package com.ksp.wke.kspt04;
import static com.ksp.com.KSPCOM_BasConst.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.ServletRequest;
import javax.servlet.http.HttpServletRequest;

import org.omg.CORBA.INTERNAL;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.ksp.api.KSPAPI_UsrAuth;
import com.ksp.dom.KSPDOM_ResDta;
import com.ksp.dom.KSPDOM_TabDta;
import com.ksp.dom.KSPDOM_User;

import net.minidev.json.JSONArray;
import net.minidev.json.JSONValue;

/**
 * 用户任务列表查询
 * @author anye
 *
 */
@Controller
public class KSPT04Controller {

	@Autowired
	private KSPT04Mapper kspt04Mapper;

	@RequestMapping("/tsk/KSPT04")
	@ResponseBody
	public KSPDOM_ResDta iniPam(ServletRequest request) {
		String WTchIdn = request.getParameter(TCH_IDN);
		KSPDOM_User wCurUsr = KSPAPI_UsrAuth.getUsrInf(request);
		String wUsrOam = wCurUsr.getUsroam();
		

		//
		Map<String, Object> wPamMap = new HashMap<>();
		wPamMap.put(TCH_IDN, WTchIdn);
		wPamMap.put(USR_OAM, wUsrOam);
		KSPDOM_ResDta wResDta = new KSPDOM_ResDta();
		
		try {
			wResDta = exeSrv(wPamMap);
		} catch (Exception e) {
			wResDta.setCod("400");
			wResDta.setMsg(e.getMessage());
		}
		return wResDta;
	}

	public KSPDOM_ResDta exeSrv(Map<String, Object> pPamMap) {
		kspt04Mapper.delTskInf(pPamMap);

		return KSPDOM_ResDta.buildSucc("");
	}
}
